<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="Application">
  <label>
    <input type="radio" value="page1" v-model="page"/>
  </label>页面1
  <label>
    <input type="radio" value="page2" v-model="page"/>
  </label>页面2
  <component :is="page"></component>
</div>

<script>
  const {createApp, ref} = Vue;
  const App = createApp({
    setup() {
      const page = ref('page1')
      return {page}
    }
  })
  const page1 = {
    template: `<div style="color: red;">页面组件1</div>`
  }
  App.component('page1', page1)
  const page2 = {
    template: `<div style="color: blue;">页面组件2</div>`
  }
  App.component('page2', page2)
  App.mount("#Application");
</script>
</body>
</html>